<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>帅哥美女走一走</title>
</head>

<body>
  <!-- 创建一个容器 -->
  <div id="app">
    <ul>
      <li v-for="(item,index) in list">{{item}}</li>
    </ul>
    <button @click="btn">走一走</button>
  </div>
  <!-- 导包 -->
  <script src="./js/vue-2.7.14.js"></script>
  <!-- 实例化vue对象 -->
  <script>
    let app = new Vue({
      el: '#app',
      data: {
        list: ['帅哥', '美女', '程序员']
      },
      methods: {
        btn() {
          // console.log(this.list.push(this.list[0]))
          // console.log(this.list.splice(this.list[0], 1))
          this.list.push(this.list[0])
          this.list.splice(this.list[0], 1)
        }
      }

    })
  </script>
</body>

</html>